package com.mirror.repository;

import com.mirror.entity.building.Floor;
import com.mirror.entity.building.Room;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoomRepository extends JpaRepository<Room, String>, JpaSpecificationExecutor<Room> {


    Page<Room> findAllByIsdelAndFloorOrderByRoomName(Pageable pageable, boolean isdel, Floor floor);


    List<Room> findAllByIsdelAndFloorOrderByRoomName(boolean isdel, Floor floor);

    List<Room> findAllByIsdelAndFloor_IdOrderByRoomName(boolean isdel, String floor);

}
